<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="copyright" content="http://www.appcms.org" />
<link href="skin/base.css" type="text/css" rel="stylesheet" />
<link href="skin/user.css" type="text/css" rel="stylesheet">
<script src="js/zy_control.js"></script>
<script src="js/zy_click.js"></script>
<script src="js/config.js"></script>
<script src="js/common.js"></script>
</head>
<body ontouchstart>
<div id="main" class="loading"></div>
</body>
<script>
	zy_init();
    window.uexOnload = function(type){
        if (!type){
			uexWindow.setBounce("1");
			uexXmlHttpMgr.onData = function(opId, status, data){	
				if (status == 1) {
					$$('main').className = '';
					data=JSON.parse(data);
					if(data['success']=='OK'){
						var html ='<div class="user"><ul class="list">';
						var list = data['data'];
						for (i in list) {
							//html += '<li ontouchstart="zy_touch(\'down\')"  onclick="javascript:jump('+list[i]['activity']['id']+');"><span>'+list[i]['activity']['title']+'</span><em>0</em></li>';
							
							html += '<li ontouchstart="zy_touch(\'down\')"  onclick="javascript:jump('+list[i]['activity']['id']+');">'+
									
							        '<div class="l"><h3>'+list[i]['activity']['title']+'</h3>'+
									'<span>有效期：'+list[i]['activity']['start_time']+'到'+list[i]['activity']['end_time']+'</span>'+
									'<span>报名时间：'+list[i]['timeApply']+'</span></div>';
									
									html += '<div class="r">';
									if(list[i]['activity']['is_time'] >0){
										html += '<span class="c">过期</spnn>';
									}else{
										html += '<span class="a">可用</spnn>';
									}	
									html += '</div></li>';
						} 
						html +='</ul></div>';
						$$('main').innerHTML = html;
					}else{
						uexWindow.toast("0","5",data['msg'],1000);
					}
				}else if(status==-1){
					uexWindow.toast("0","5",'加载超时',1000);
				}
			}
			
			
			var url=app_path+'index.php?m=iapp&c=user&a=my_activity&userid='+localStorage['u_id']+'&acctoken='+localStorage['u_acctoken'];
			uexXmlHttpMgr.open('1','post',url,"8000");
			uexXmlHttpMgr.send('1');
			
			
		}
    }
	
	function jump(id){
		localStorage['activity_id']=id;
		uexWindow.open('activity_show','0','activity_show.html','2','', '',0);
	}
	
</script>
</html>